<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE MagicHash #-}</span><span>
</span><span id="line-2"></span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Pretty-printing assembly language</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- (c) The University of Glasgow 1993-2005</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-10"></span><span>
</span><span id="line-11"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.Ppr</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-12"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#castFloatToWord8Array"><span class="hs-identifier">castFloatToWord8Array</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#castDoubleToWord8Array"><span class="hs-identifier">castDoubleToWord8Array</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#floatToBytes"><span class="hs-identifier">floatToBytes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#doubleToBytes"><span class="hs-identifier">doubleToBytes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprASCII"><span class="hs-identifier">pprASCII</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprString"><span class="hs-identifier">pprString</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprFileEmbed"><span class="hs-identifier">pprFileEmbed</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprSectionHeader"><span class="hs-identifier">pprSectionHeader</span></a></span><span>
</span><span id="line-20"></span><span class="hs-special">)</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">where</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-25"></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Asm.html"><span class="hs-identifier">GHC.Utils.Asm</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html"><span class="hs-identifier">GHC.Cmm.CLabel</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html"><span class="hs-identifier">GHC.CmmToAsm.Config</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.FastString.html"><span class="hs-identifier">GHC.Data.FastString</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.Unsafe.html#"><span class="hs-identifier">Data.Array.Unsafe</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">U</span></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.Base.html#castSTUArray"><span class="hs-identifier">castSTUArray</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.ST.html#"><span class="hs-identifier">Data.Array.ST</span></a></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.ST.html#"><span class="hs-identifier">Control.Monad.ST</span></a></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Bits.html#"><span class="hs-identifier">Data.Bits</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier">ByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">BS</span></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exts.html#"><span class="hs-identifier">GHC.Exts</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#"><span class="hs-identifier">GHC.Word</span></a></span><span>
</span><span id="line-45"></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- Converting floating-point literals to integrals for printing</span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span id="local-6989586621681005307"><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#castFloatToWord8Array"><span class="hs-identifier hs-type">castFloatToWord8Array</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.Base.html#STUArray"><span class="hs-identifier hs-type">STUArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681005307"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681005307"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../array/src/Data.Array.Base.html#STUArray"><span class="hs-identifier hs-type">STUArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681005307"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-52"></span><span id="castFloatToWord8Array"><span class="annot"><span class="annottext">castFloatToWord8Array :: forall s. STUArray s Int Float -&gt; ST s (STUArray s Int Word8)
</span><a href="GHC.CmmToAsm.Ppr.html#castFloatToWord8Array"><span class="hs-identifier hs-var hs-var">castFloatToWord8Array</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Float -&gt; ST s (STUArray s Int Word8)
forall s ix a b. STUArray s ix a -&gt; ST s (STUArray s ix b)
</span><a href="../../array/src/Data.Array.Base.html#castSTUArray"><span class="hs-identifier hs-var">U.castSTUArray</span></a></span><span>
</span><span id="line-53"></span><span>
</span><span id="line-54"></span><span id="local-6989586621681005299"><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#castDoubleToWord8Array"><span class="hs-identifier hs-type">castDoubleToWord8Array</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../array/src/Data.Array.Base.html#STUArray"><span class="hs-identifier hs-type">STUArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681005299"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Double</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.ST.html#ST"><span class="hs-identifier hs-type">ST</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681005299"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../array/src/Data.Array.Base.html#STUArray"><span class="hs-identifier hs-type">STUArray</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681005299"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-55"></span><span id="castDoubleToWord8Array"><span class="annot"><span class="annottext">castDoubleToWord8Array :: forall s. STUArray s Int Double -&gt; ST s (STUArray s Int Word8)
</span><a href="GHC.CmmToAsm.Ppr.html#castDoubleToWord8Array"><span class="hs-identifier hs-var hs-var">castDoubleToWord8Array</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Double -&gt; ST s (STUArray s Int Word8)
forall s ix a b. STUArray s ix a -&gt; ST s (STUArray s ix b)
</span><a href="../../array/src/Data.Array.Base.html#castSTUArray"><span class="hs-identifier hs-var">U.castSTUArray</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-comment">-- floatToBytes and doubleToBytes convert to the host's byte</span><span>
</span><span id="line-58"></span><span class="hs-comment">-- order.  Providing that we're not cross-compiling for a</span><span>
</span><span id="line-59"></span><span class="hs-comment">-- target with the opposite endianness, this should work ok</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- on all targets.</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-comment">-- ToDo: this stuff is very similar to the shenanigans in PprAbs,</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- could they be merged?</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#floatToBytes"><span class="hs-identifier hs-type">floatToBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">]</span><span>
</span><span id="line-66"></span><span id="floatToBytes"><span class="annot"><span class="annottext">floatToBytes :: Float -&gt; [Int]
</span><a href="GHC.CmmToAsm.Ppr.html#floatToBytes"><span class="hs-identifier hs-var hs-var">floatToBytes</span></a></span></span><span> </span><span id="local-6989586621681005212"><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621681005212"><span class="hs-identifier hs-var">f</span></a></span></span><span>
</span><span id="line-67"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall s. ST s [Int]) -&gt; [Int]
forall a. (forall s. ST s a) -&gt; a
</span><a href="../../base/src/GHC.ST.html#runST"><span class="hs-identifier hs-var">runST</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span>
</span><span id="line-68"></span><span>        </span><span id="local-6989586621681005176"><span class="annot"><span class="annottext">STUArray s Int Float
</span><a href="#local-6989586621681005176"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; ST s (STUArray s Int Float)
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
(i, i) -&gt; m (a i e)
</span><a href="../../array/src/Data.Array.Base.html#newArray_"><span class="hs-identifier hs-var">newArray_</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-glyph">::</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-69"></span><span>        </span><span class="annot"><span class="annottext">STUArray s Int Float -&gt; Int -&gt; Float -&gt; ST s ()
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; e -&gt; m ()
</span><a href="../../array/src/Data.Array.Base.html#writeArray"><span class="hs-identifier hs-var">writeArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Float
</span><a href="#local-6989586621681005176"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Float
</span><a href="#local-6989586621681005212"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-70"></span><span>        </span><span id="local-6989586621681005173"><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005173"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Float -&gt; ST s (STUArray s Int Word8)
forall s. STUArray s Int Float -&gt; ST s (STUArray s Int Word8)
</span><a href="GHC.CmmToAsm.Ppr.html#castFloatToWord8Array"><span class="hs-identifier hs-var">castFloatToWord8Array</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Float
</span><a href="#local-6989586621681005176"><span class="hs-identifier hs-var">arr</span></a></span><span>
</span><span id="line-71"></span><span>        </span><span id="local-6989586621681005172"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005172"><span class="hs-identifier hs-var">i0</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005173"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-72"></span><span>        </span><span id="local-6989586621681005170"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005170"><span class="hs-identifier hs-var">i1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005173"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-73"></span><span>        </span><span id="local-6989586621681005169"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005169"><span class="hs-identifier hs-var">i2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005173"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-74"></span><span>        </span><span id="local-6989586621681005168"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005168"><span class="hs-identifier hs-var">i3</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005173"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-75"></span><span>        </span><span class="annot"><span class="annottext">[Int] -&gt; ST s [Int]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Word8 -&gt; Int) -&gt; [Word8] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005172"><span class="hs-identifier hs-var">i0</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005170"><span class="hs-identifier hs-var">i1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005169"><span class="hs-identifier hs-var">i2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005168"><span class="hs-identifier hs-var">i3</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>     </span><span class="hs-special">)</span><span>
</span><span id="line-77"></span><span>
</span><span id="line-78"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#doubleToBytes"><span class="hs-identifier hs-type">doubleToBytes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Double</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">]</span><span>
</span><span id="line-79"></span><span id="doubleToBytes"><span class="annot"><span class="annottext">doubleToBytes :: Double -&gt; [Int]
</span><a href="GHC.CmmToAsm.Ppr.html#doubleToBytes"><span class="hs-identifier hs-var hs-var">doubleToBytes</span></a></span></span><span> </span><span id="local-6989586621681005167"><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621681005167"><span class="hs-identifier hs-var">d</span></a></span></span><span>
</span><span id="line-80"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(forall s. ST s [Int]) -&gt; [Int]
forall a. (forall s. ST s a) -&gt; a
</span><a href="../../base/src/GHC.ST.html#runST"><span class="hs-identifier hs-var">runST</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span>
</span><span id="line-81"></span><span>        </span><span id="local-6989586621681005121"><span class="annot"><span class="annottext">STUArray s Int Double
</span><a href="#local-6989586621681005121"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Int, Int) -&gt; ST s (STUArray s Int Double)
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
(i, i) -&gt; m (a i e)
</span><a href="../../array/src/Data.Array.Base.html#newArray_"><span class="hs-identifier hs-var">newArray_</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-glyph">::</span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span>        </span><span class="annot"><span class="annottext">STUArray s Int Double -&gt; Int -&gt; Double -&gt; ST s ()
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; e -&gt; m ()
</span><a href="../../array/src/Data.Array.Base.html#writeArray"><span class="hs-identifier hs-var">writeArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Double
</span><a href="#local-6989586621681005121"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Double
</span><a href="#local-6989586621681005167"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-83"></span><span>        </span><span id="local-6989586621681005120"><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Double -&gt; ST s (STUArray s Int Word8)
forall s. STUArray s Int Double -&gt; ST s (STUArray s Int Word8)
</span><a href="GHC.CmmToAsm.Ppr.html#castDoubleToWord8Array"><span class="hs-identifier hs-var">castDoubleToWord8Array</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Double
</span><a href="#local-6989586621681005121"><span class="hs-identifier hs-var">arr</span></a></span><span>
</span><span id="line-84"></span><span>        </span><span id="local-6989586621681005119"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005119"><span class="hs-identifier hs-var">i0</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-85"></span><span>        </span><span id="local-6989586621681005118"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005118"><span class="hs-identifier hs-var">i1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">1</span></span><span>
</span><span id="line-86"></span><span>        </span><span id="local-6989586621681005117"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005117"><span class="hs-identifier hs-var">i2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-87"></span><span>        </span><span id="local-6989586621681005116"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005116"><span class="hs-identifier hs-var">i3</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span>
</span><span id="line-88"></span><span>        </span><span id="local-6989586621681005115"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005115"><span class="hs-identifier hs-var">i4</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span>
</span><span id="line-89"></span><span>        </span><span id="local-6989586621681005114"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005114"><span class="hs-identifier hs-var">i5</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">5</span></span><span>
</span><span id="line-90"></span><span>        </span><span id="local-6989586621681005113"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005113"><span class="hs-identifier hs-var">i6</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span>
</span><span id="line-91"></span><span>        </span><span id="local-6989586621681005112"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005112"><span class="hs-identifier hs-var">i7</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8 -&gt; Int -&gt; ST s Word8
forall (a :: * -&gt; * -&gt; *) e (m :: * -&gt; *) i.
(MArray a e m, Ix i) =&gt;
a i e -&gt; i -&gt; m e
</span><a href="../../array/src/Data.Array.Base.html#readArray"><span class="hs-identifier hs-var">readArray</span></a></span><span> </span><span class="annot"><span class="annottext">STUArray s Int Word8
</span><a href="#local-6989586621681005120"><span class="hs-identifier hs-var">arr</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span>
</span><span id="line-92"></span><span>        </span><span class="annot"><span class="annottext">[Int] -&gt; ST s [Int]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Word8 -&gt; Int) -&gt; [Word8] -&gt; [Int]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Int
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005119"><span class="hs-identifier hs-var">i0</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005118"><span class="hs-identifier hs-var">i1</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005117"><span class="hs-identifier hs-var">i2</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005116"><span class="hs-identifier hs-var">i3</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005115"><span class="hs-identifier hs-var">i4</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005114"><span class="hs-identifier hs-var">i5</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005113"><span class="hs-identifier hs-var">i6</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005112"><span class="hs-identifier hs-var">i7</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span>     </span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-96"></span><span class="hs-comment">-- Printing ASCII strings.</span><span>
</span><span id="line-97"></span><span class="hs-comment">--</span><span>
</span><span id="line-98"></span><span class="hs-comment">-- Print as a string and escape non-printable characters.</span><span>
</span><span id="line-99"></span><span class="hs-comment">-- This is similar to charToC in GHC.Utils.Misc</span><span>
</span><span id="line-100"></span><span>
</span><span id="line-101"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprASCII"><span class="hs-identifier hs-type">pprASCII</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-102"></span><span id="pprASCII"><span class="annot"><span class="annottext">pprASCII :: ByteString -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprASCII"><span class="hs-identifier hs-var hs-var">pprASCII</span></a></span></span><span> </span><span id="local-6989586621681005111"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621681005111"><span class="hs-identifier hs-var">str</span></a></span></span><span>
</span><span id="line-103"></span><span>  </span><span class="hs-comment">-- Transform this given literal bytestring to escaped string and construct</span><span>
</span><span id="line-104"></span><span>  </span><span class="hs-comment">-- the literal SDoc directly.</span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-comment">-- See #14741</span><span>
</span><span id="line-106"></span><span>  </span><span class="hs-comment">-- and Note [Pretty print ASCII when AsmCodeGen]</span><span>
</span><span id="line-107"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; SDoc) -&gt; String -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Word8 -&gt; String -&gt; String) -&gt; String -&gt; ByteString -&gt; String
forall a. (Word8 -&gt; a -&gt; a) -&gt; a -&gt; ByteString -&gt; a
</span><a href="../../bytestring/src/Data.ByteString.html#foldr"><span class="hs-identifier hs-var">BS.foldr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681005108"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005108"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span id="local-6989586621681005107"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681005107"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; String
</span><a href="#local-6989586621681005106"><span class="hs-identifier hs-var">do1</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005108"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681005107"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621681005111"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-108"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>       </span><span class="annot"><a href="#local-6989586621681005106"><span class="hs-identifier hs-type">do1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-110"></span><span>       </span><span id="local-6989586621681005106"><span class="annot"><span class="annottext">do1 :: Word8 -&gt; String
</span><a href="#local-6989586621681005106"><span class="hs-identifier hs-var hs-var">do1</span></a></span></span><span> </span><span id="local-6989586621681005105"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x09</span></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\\t&quot;</span></span><span>
</span><span id="line-111"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x0A</span></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\\n&quot;</span></span><span>
</span><span id="line-112"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x22</span></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\\\&quot;&quot;</span></span><span>
</span><span id="line-113"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x5C</span></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\\\\&quot;</span></span><span>
</span><span id="line-114"></span><span>               </span><span class="hs-comment">-- ASCII printable characters range</span><span>
</span><span id="line-115"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x20</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x7E</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Word8 -&gt; Char
</span><a href="#local-6989586621681005102"><span class="hs-identifier hs-var">chr'</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-116"></span><span>             </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; String
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; String
</span><a href="#local-6989586621681005101"><span class="hs-identifier hs-var">octal</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005105"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-117"></span><span>
</span><span id="line-118"></span><span>       </span><span class="hs-comment">-- we know that the Chars we create are in the ASCII range</span><span>
</span><span id="line-119"></span><span>       </span><span class="hs-comment">-- so we bypass the check in &quot;chr&quot;</span><span>
</span><span id="line-120"></span><span>       </span><span class="annot"><a href="#local-6989586621681005102"><span class="hs-identifier hs-type">chr'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span>
</span><span id="line-121"></span><span>       </span><span id="local-6989586621681005102"><span class="annot"><span class="annottext">chr' :: Word8 -&gt; Char
</span><a href="#local-6989586621681005102"><span class="hs-identifier hs-var hs-var">chr'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Word.html#W8%23"><span class="hs-identifier hs-type">W8#</span></a></span><span> </span><span id="local-6989586621681005100"><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621681005100"><span class="hs-identifier hs-var">w#</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char# -&gt; Char
</span><span class="hs-identifier hs-var">C#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int# -&gt; Char#
</span><span class="hs-identifier hs-var">chr#</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word# -&gt; Int#
</span><span class="hs-identifier hs-var">word2Int#</span></span><span> </span><span class="annot"><span class="annottext">Word#
</span><a href="#local-6989586621681005100"><span class="hs-identifier hs-var">w#</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span>       </span><span class="annot"><a href="#local-6989586621681005101"><span class="hs-identifier hs-type">octal</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-124"></span><span>       </span><span id="local-6989586621681005101"><span class="annot"><span class="annottext">octal :: Word8 -&gt; String
</span><a href="#local-6989586621681005101"><span class="hs-identifier hs-var hs-var">octal</span></a></span></span><span> </span><span id="local-6989586621681005099"><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005099"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Char
</span><a href="#local-6989586621681005102"><span class="hs-identifier hs-var">chr'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005098"><span class="hs-identifier hs-var">ord0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005099"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Int -&gt; Word8
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#unsafeShiftR"><span class="hs-operator hs-var">`unsafeShiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">6</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x07</span></span><span class="hs-special">)</span><span>
</span><span id="line-125"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Char
</span><a href="#local-6989586621681005102"><span class="hs-identifier hs-var">chr'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005098"><span class="hs-identifier hs-var">ord0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005099"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Int -&gt; Word8
forall a. Bits a =&gt; a -&gt; Int -&gt; a
</span><a href="../../base/src/Data.Bits.html#unsafeShiftR"><span class="hs-operator hs-var">`unsafeShiftR`</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x07</span></span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>                 </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Char
</span><a href="#local-6989586621681005102"><span class="hs-identifier hs-var">chr'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005098"><span class="hs-identifier hs-var">ord0</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><a href="#local-6989586621681005099"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Word8 -&gt; Word8
forall a. Bits a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/Data.Bits.html#.%26."><span class="hs-operator hs-var">.&amp;.</span></a></span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x07</span></span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span>                 </span><span class="hs-special">]</span><span>
</span><span id="line-128"></span><span>       </span><span id="local-6989586621681005098"><span class="annot"><span class="annottext">ord0 :: Word8
</span><a href="#local-6989586621681005098"><span class="hs-identifier hs-var hs-var">ord0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word8
</span><span class="hs-number">0x30</span></span><span> </span><span class="hs-comment">-- = ord '0'</span><span>
</span><span id="line-129"></span><span>
</span><span id="line-130"></span><span class="hs-comment">-- | Emit a &quot;.string&quot; directive</span><span>
</span><span id="line-131"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprString"><span class="hs-identifier hs-type">pprString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-132"></span><span id="pprString"><span class="annot"><span class="annottext">pprString :: ByteString -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprString"><span class="hs-identifier hs-var hs-var">pprString</span></a></span></span><span> </span><span id="local-6989586621681005093"><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621681005093"><span class="hs-identifier hs-var">bs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\t.string &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#doubleQuotes"><span class="hs-identifier hs-var">doubleQuotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ByteString -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprASCII"><span class="hs-identifier hs-var">pprASCII</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString
</span><a href="#local-6989586621681005093"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-133"></span><span>
</span><span id="line-134"></span><span class="hs-comment">-- | Emit a &quot;.incbin&quot; directive</span><span>
</span><span id="line-135"></span><span class="hs-comment">--</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- A NULL byte is added after the binary data.</span><span>
</span><span id="line-137"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprFileEmbed"><span class="hs-identifier hs-type">pprFileEmbed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-138"></span><span id="pprFileEmbed"><span class="annot"><span class="annottext">pprFileEmbed :: String -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprFileEmbed"><span class="hs-identifier hs-var hs-var">pprFileEmbed</span></a></span></span><span> </span><span id="local-6989586621681005089"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681005089"><span class="hs-identifier hs-var">path</span></a></span></span><span>
</span><span id="line-139"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\t.incbin &quot;</span></span><span>
</span><span id="line-140"></span><span>     </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#pprFilePathString"><span class="hs-identifier hs-var">pprFilePathString</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621681005089"><span class="hs-identifier hs-var">path</span></a></span><span> </span><span class="hs-comment">-- proper escape (see #16389)</span><span>
</span><span id="line-141"></span><span>     </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\n\t.byte 0&quot;</span></span><span>
</span><span id="line-142"></span><span>
</span><span id="line-143"></span><span class="hs-comment">{-
Note [Embedding large binary blobs]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To embed a blob of binary data (e.g. an UTF-8 encoded string) into the generated
code object, we have several options:

   1. Generate a &quot;.byte&quot; directive for each byte. This is what was done in the past
      (see Note [Pretty print ASCII when AsmCodeGen]).

   2. Generate a single &quot;.string&quot;/&quot;.asciz&quot; directive for the whole sequence of
      bytes. Bytes in the ASCII printable range are rendered as characters and
      other values are escaped (e.g., &quot;\t&quot;, &quot;\077&quot;, etc.).

   3. Create a temporary file into which we dump the binary data and generate a
      single &quot;.incbin&quot; directive. The assembler will include the binary file for
      us in the generated output object.

Now the code generator uses either (2) or (3), depending on the binary blob
size.  Using (3) for small blobs adds too much overhead (see benchmark results
in #16190), so we only do it when the size is above a threshold (500K at the
time of writing).

The threshold is configurable via the `-fbinary-blob-threshold` flag.

-}</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span class="hs-comment">{-
Note [Pretty print ASCII when AsmCodeGen]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Previously, when generating assembly code, we created SDoc with
`(ptext . sLit)` for every bytes in literal bytestring, then
combine them using `hcat`.

When handling literal bytestrings with millions of bytes,
millions of SDoc would be created and to combine, leading to
high memory usage.

Now we escape the given bytestring to string directly and construct
SDoc only once. This improvement could dramatically decrease the
memory allocation from 4.7GB to 1.3GB when embedding a 3MB literal
string in source code. See #14741 for profiling results.
-}</span><span>
</span><span id="line-187"></span><span>
</span><span id="line-188"></span><span class="hs-comment">-- ----------------------------------------------------------------------------</span><span>
</span><span id="line-189"></span><span class="hs-comment">-- Printing section headers.</span><span>
</span><span id="line-190"></span><span class="hs-comment">--</span><span>
</span><span id="line-191"></span><span class="hs-comment">-- If -split-section was specified, include the suffix label, otherwise just</span><span>
</span><span id="line-192"></span><span class="hs-comment">-- print the section type. For Darwin, where subsections-for-symbols are</span><span>
</span><span id="line-193"></span><span class="hs-comment">-- used instead, only print section type.</span><span>
</span><span id="line-194"></span><span class="hs-comment">--</span><span>
</span><span id="line-195"></span><span class="hs-comment">-- For string literals, additional flags are specified to enable merging of</span><span>
</span><span id="line-196"></span><span class="hs-comment">-- identical strings in the linker. With -split-sections each string also gets</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- a unique section to allow strings from unused code to be GC'd.</span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprSectionHeader"><span class="hs-identifier hs-type">pprSectionHeader</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier hs-type">Section</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-200"></span><span id="pprSectionHeader"><span class="annot"><span class="annottext">pprSectionHeader :: NCGConfig -&gt; Section -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprSectionHeader"><span class="hs-identifier hs-var hs-var">pprSectionHeader</span></a></span></span><span> </span><span id="local-6989586621681005087"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681005087"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#Section"><span class="hs-identifier hs-type">Section</span></a></span><span> </span><span id="local-6989586621681005085"><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005085"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621681005084"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681005084"><span class="hs-identifier hs-var">suffix</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-201"></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681005087"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-202"></span><span>   </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSAIX"><span class="hs-identifier hs-var">OSAIX</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionType -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprXcoffSectionHeader"><span class="hs-identifier hs-var">pprXcoffSectionHeader</span></a></span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005085"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-203"></span><span>   </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSDarwin"><span class="hs-identifier hs-var">OSDarwin</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SectionType -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprDarwinSectionHeader"><span class="hs-identifier hs-var">pprDarwinSectionHeader</span></a></span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005085"><span class="hs-identifier hs-var">t</span></a></span><span>
</span><span id="line-204"></span><span>   </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; SDoc -&gt; SectionType -&gt; CLabel -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprGNUSectionHeader"><span class="hs-identifier hs-var">pprGNUSectionHeader</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681005087"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'$'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005085"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681005084"><span class="hs-identifier hs-var">suffix</span></a></span><span>
</span><span id="line-205"></span><span>   </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; SDoc -&gt; SectionType -&gt; CLabel -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprGNUSectionHeader"><span class="hs-identifier hs-var">pprGNUSectionHeader</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681005087"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005085"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681005084"><span class="hs-identifier hs-var">suffix</span></a></span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprGNUSectionHeader"><span class="hs-identifier hs-type">pprGNUSectionHeader</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#SectionType"><span class="hs-identifier hs-type">SectionType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.CLabel.html#CLabel"><span class="hs-identifier hs-type">CLabel</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-208"></span><span id="pprGNUSectionHeader"><span class="annot"><span class="annottext">pprGNUSectionHeader :: NCGConfig -&gt; SDoc -&gt; SectionType -&gt; CLabel -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprGNUSectionHeader"><span class="hs-identifier hs-var hs-var">pprGNUSectionHeader</span></a></span></span><span> </span><span id="local-6989586621681005074"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681005074"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span id="local-6989586621681005073"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681005073"><span class="hs-identifier hs-var">sep</span></a></span></span><span> </span><span id="local-6989586621681005072"><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005072"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span id="local-6989586621681005071"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681005071"><span class="hs-identifier hs-var">suffix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-209"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.section &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">PtrString
</span><a href="#local-6989586621681005069"><span class="hs-identifier hs-var">header</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681005068"><span class="hs-identifier hs-var">subsection</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681005067"><span class="hs-identifier hs-var">flags</span></a></span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-211"></span><span>    </span><span id="local-6989586621681005066"><span class="annot"><span class="annottext">platform :: Platform
</span><a href="#local-6989586621681005066"><span class="hs-identifier hs-var hs-var">platform</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681005074"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-212"></span><span>    </span><span id="local-6989586621681005065"><span class="annot"><span class="annottext">splitSections :: Bool
</span><a href="#local-6989586621681005065"><span class="hs-identifier hs-var hs-var">splitSections</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Bool
</span><a href="GHC.CmmToAsm.Config.html#ncgSplitSections"><span class="hs-identifier hs-var hs-var">ncgSplitSections</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681005074"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-213"></span><span>    </span><span id="local-6989586621681005068"><span class="annot"><span class="annottext">subsection :: SDoc
</span><a href="#local-6989586621681005068"><span class="hs-identifier hs-var hs-var">subsection</span></a></span></span><span>
</span><span id="line-214"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681005065"><span class="hs-identifier hs-var">splitSections</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681005073"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681005071"><span class="hs-identifier hs-var">suffix</span></a></span><span>
</span><span id="line-215"></span><span>      </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-216"></span><span>    </span><span id="local-6989586621681005069"><span class="annot"><span class="annottext">header :: PtrString
</span><a href="#local-6989586621681005069"><span class="hs-identifier hs-var hs-var">header</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005072"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-217"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Text"><span class="hs-identifier hs-var">Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.text&quot;</span></span><span>
</span><span id="line-218"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Data"><span class="hs-identifier hs-var">Data</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.data&quot;</span></span><span>
</span><span id="line-219"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData"><span class="hs-identifier hs-var">ReadOnlyData</span></a></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681005066"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-220"></span><span>                                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.rdata&quot;</span></span><span>
</span><span id="line-221"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.rodata&quot;</span></span><span>
</span><span id="line-222"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#RelocatableReadOnlyData"><span class="hs-identifier hs-var">RelocatableReadOnlyData</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681005066"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-223"></span><span>                                </span><span class="hs-comment">-- Concept does not exist on Windows,</span><span>
</span><span id="line-224"></span><span>                                </span><span class="hs-comment">-- So map these to R/O data.</span><span>
</span><span id="line-225"></span><span>                                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.rdata$rel.ro&quot;</span></span><span>
</span><span id="line-226"></span><span>                              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.data.rel.ro&quot;</span></span><span>
</span><span id="line-227"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#UninitialisedData"><span class="hs-identifier hs-var">UninitialisedData</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.bss&quot;</span></span><span>
</span><span id="line-228"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData16"><span class="hs-identifier hs-var">ReadOnlyData16</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681005066"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-229"></span><span>                                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.rdata$cst16&quot;</span></span><span>
</span><span id="line-230"></span><span>                     </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.rodata.cst16&quot;</span></span><span>
</span><span id="line-231"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#CString"><span class="hs-identifier hs-var">CString</span></a></span><span>
</span><span id="line-232"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681005066"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-233"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.rdata&quot;</span></span><span>
</span><span id="line-234"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.rodata.str&quot;</span></span><span>
</span><span id="line-235"></span><span>      </span><span class="annot"><a href="GHC.Cmm.html#OtherSection"><span class="hs-identifier hs-type">OtherSection</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-236"></span><span>        </span><span class="annot"><span class="annottext">String -&gt; PtrString
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PprBase.pprGNUSectionHeader: unknown section type&quot;</span></span><span>
</span><span id="line-237"></span><span>    </span><span id="local-6989586621681005067"><span class="annot"><span class="annottext">flags :: SDoc
</span><a href="#local-6989586621681005067"><span class="hs-identifier hs-var hs-var">flags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005072"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-238"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#CString"><span class="hs-identifier hs-var">CString</span></a></span><span>
</span><span id="line-239"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSMinGW32"><span class="hs-identifier hs-var">OSMinGW32</span></a></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681005066"><span class="hs-identifier hs-var">platform</span></a></span><span>
</span><span id="line-240"></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-241"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;,\&quot;aMS\&quot;,&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; String -&gt; SDoc
</span><a href="GHC.Utils.Asm.html#sectionType"><span class="hs-identifier hs-var">sectionType</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681005066"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;progbits&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;,1&quot;</span></span><span>
</span><span id="line-242"></span><span>      </span><span class="annot"><span class="annottext">SectionType
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-243"></span><span>
</span><span id="line-244"></span><span class="hs-comment">-- XCOFF doesn't support relocating label-differences, so we place all</span><span>
</span><span id="line-245"></span><span class="hs-comment">-- RO sections into .text[PR] sections</span><span>
</span><span id="line-246"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprXcoffSectionHeader"><span class="hs-identifier hs-type">pprXcoffSectionHeader</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#SectionType"><span class="hs-identifier hs-type">SectionType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-247"></span><span id="pprXcoffSectionHeader"><span class="annot"><span class="annottext">pprXcoffSectionHeader :: SectionType -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprXcoffSectionHeader"><span class="hs-identifier hs-var hs-var">pprXcoffSectionHeader</span></a></span></span><span> </span><span id="local-6989586621681005048"><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005048"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; SDoc) -&gt; String -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005048"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-248"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Text"><span class="hs-identifier hs-var">Text</span></a></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.csect .text[PR]&quot;</span></span><span>
</span><span id="line-249"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Data"><span class="hs-identifier hs-var">Data</span></a></span><span>                    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.csect .data[RW]&quot;</span></span><span>
</span><span id="line-250"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData"><span class="hs-identifier hs-var">ReadOnlyData</span></a></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.csect .text[PR] # ReadOnlyData&quot;</span></span><span>
</span><span id="line-251"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#RelocatableReadOnlyData"><span class="hs-identifier hs-var">RelocatableReadOnlyData</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.csect .text[PR] # RelocatableReadOnlyData&quot;</span></span><span>
</span><span id="line-252"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData16"><span class="hs-identifier hs-var">ReadOnlyData16</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.csect .text[PR] # ReadOnlyData16&quot;</span></span><span>
</span><span id="line-253"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#CString"><span class="hs-identifier hs-var">CString</span></a></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.csect .text[PR] # CString&quot;</span></span><span>
</span><span id="line-254"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#UninitialisedData"><span class="hs-identifier hs-var">UninitialisedData</span></a></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.csect .data[BS]&quot;</span></span><span>
</span><span id="line-255"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#OtherSection"><span class="hs-identifier hs-type">OtherSection</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span>          </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-256"></span><span>       </span><span class="annot"><span class="annottext">String -&gt; String
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PprBase.pprXcoffSectionHeader: unknown section type&quot;</span></span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="annot"><a href="GHC.CmmToAsm.Ppr.html#pprDarwinSectionHeader"><span class="hs-identifier hs-type">pprDarwinSectionHeader</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.html#SectionType"><span class="hs-identifier hs-type">SectionType</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-259"></span><span id="pprDarwinSectionHeader"><span class="annot"><span class="annottext">pprDarwinSectionHeader :: SectionType -&gt; SDoc
</span><a href="GHC.CmmToAsm.Ppr.html#pprDarwinSectionHeader"><span class="hs-identifier hs-var hs-var">pprDarwinSectionHeader</span></a></span></span><span> </span><span id="local-6989586621681005047"><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005047"><span class="hs-identifier hs-var">t</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-260"></span><span>  </span><span class="annot"><span class="annottext">PtrString -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ptext"><span class="hs-identifier hs-var">ptext</span></a></span><span> </span><span class="annot"><span class="annottext">(PtrString -&gt; SDoc) -&gt; PtrString -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SectionType
</span><a href="#local-6989586621681005047"><span class="hs-identifier hs-var">t</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-261"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Text"><span class="hs-identifier hs-var">Text</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.text&quot;</span></span><span>
</span><span id="line-262"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#Data"><span class="hs-identifier hs-var">Data</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.data&quot;</span></span><span>
</span><span id="line-263"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData"><span class="hs-identifier hs-var">ReadOnlyData</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.const&quot;</span></span><span>
</span><span id="line-264"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#RelocatableReadOnlyData"><span class="hs-identifier hs-var">RelocatableReadOnlyData</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.const_data&quot;</span></span><span>
</span><span id="line-265"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#UninitialisedData"><span class="hs-identifier hs-var">UninitialisedData</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.data&quot;</span></span><span>
</span><span id="line-266"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#ReadOnlyData16"><span class="hs-identifier hs-var">ReadOnlyData16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.const&quot;</span></span><span>
</span><span id="line-267"></span><span>     </span><span class="annot"><span class="annottext">SectionType
</span><a href="GHC.Cmm.html#CString"><span class="hs-identifier hs-var">CString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; PtrString
</span><a href="GHC.Data.FastString.html#sLit"><span class="hs-identifier hs-var">sLit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;.section\t__TEXT,__cstring,cstring_literals&quot;</span></span><span>
</span><span id="line-268"></span><span>     </span><span class="annot"><a href="GHC.Cmm.html#OtherSection"><span class="hs-identifier hs-type">OtherSection</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-269"></span><span>       </span><span class="annot"><span class="annottext">String -&gt; PtrString
forall a. String -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;PprBase.pprDarwinSectionHeader: unknown section type&quot;</span></span><span>
</span><span id="line-270"></span></pre></body></html>